Skip to content

print: include socket endpoints in JSON output - #415

Open
hja-oss wants to merge 1 commit into
lsof-org:masterfrom
hja-oss:fix/json-socket-endpoints
Open

hja-oss wants to merge 1 commit into
lsof-org:masterfrom
hja-oss:fix/json-socket-endpoints

Conversation

@hja-oss

@hja-oss hja-oss commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

JSON and JSON Lines output omit Internet socket addresses and ports because these names are formatted separately rather than stored in Lf->nm.

Reuse the existing address formatter to include socket endpoints in -J and -j output, consistent with -Fn. Preserve field selection so names remain omitted when n is not selected.

Extend the existing JSON test to cover TCP listeners and connections, UDP wildcard addresses, and IPv6 endpoints in both output modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant